package com.bawei.demo_mvp;

import android.os.Bundle;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.bawei.demo_mvp.base.BaseMvpActivity;
import com.bawei.demo_mvp.entity.VideoEntity;
import com.bawei.demo_mvp.mvp.VideoContract;
import com.bawei.demo_mvp.mvp.VideoPresenter;

import java.util.List;

public class MainActivity extends BaseMvpActivity<VideoContract.IVideoView, VideoPresenter> implements VideoContract.IVideoView {


    @Override
    public int bindLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void initView(Bundle savedInstanceState) {

    }

    @Override
    public VideoPresenter createPresenter() {
        return new VideoPresenter();
    }

    @Override
    public void initData() {
        mPresenter.video(1,10);

    }

    @Override
    public void onOk() {

    }

    @Override
    public void onError() {

    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showVideo(List<VideoEntity> data) {
        Toast.makeText(MainActivity.this,"请求到数据"+data.size(),Toast.LENGTH_LONG).show();
    }
}